package com.yc.taixin.config;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;

/**
 * 随程序自启
 */
//@Component
public class BooterConfig implements ApplicationListener<ContextRefreshedEvent> {

	@Override
	public void onApplicationEvent(ContextRefreshedEvent event) {
		if (event.getApplicationContext().getParent() == null) {
			try {
				System.out.println("启动test成功...");
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}
	
}
